package com.guet.careapp.utils;

import java.math.BigInteger;
import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * Created by LXM on 2017/10/27.
 *
 * @author LXM
 * @version 1.0
 * @description 时间助手类
 * @datetime 17:53
 */
public class TimeHelper {

  /**
   * 获取当前的时间戳
   *
   * @return 时间戳
   */
  public static BigInteger getTime() {

    return BigInteger.valueOf(System.currentTimeMillis());
  }

  public static String  getFormatedTime(){
    Date d = new Date();
    SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
    return sdf.format(d);
  }
}
